<div class="dim-container-custom hide">
    <ul class="custom-column-names c-f">
        <li class="custom-column-main-table"><span>主数据表</span></li>
        <li class="custom-column-main-table-fields"><span>主表字段</span></li>
        <li class="custom-column-create-dim"><span>关联数据表</span></li>
    </ul>
    <div class="custom-main j-custom-main">
        {{each dim.custom as $cube i}}
        <div class="custom-main-box c-f j-custom-main-box">
            <span class="cube-name" cubeId={{$cube.cubeId}} title={{cubes[$cube.cubeId].name}}>{{cubes[$cube.cubeId].name}}</span>
            <span class="straight-line"></span>
            <div class="custom-main-table-fields-box" bodyIndex={{i}}>
                    <ul>
                        {{each cubes[$cube.cubeId].allFields as $field}}
                        <li class="j-custom-field" bodyIndex={{i}}>{{$field.name}}</li>
                        {{/each}}
                    </ul>
            </div>
            <div class="custom-create-new-dim-container">
                {{each $cube.children as $line j}}
                <div class="custom-create-new-dim-box j-custom-relation-box">
                    <div class="custom-create-new-dim-texts">
                        <input type="text" placeholder="请输入新维度的名称" value="{{$line.dimName}}" />
                        <textarea placeholder="请输入创建维度的逻辑语句" class="j-custom-sql" bodyIndex={{i}}>{{$line.sql}}</textarea>
                        <span class="{{if $line.sql === ''}}custom-create-new-dim-texts-wrong{{else}}custom-create-new-dim-texts-right{{/if}}"></span>
                    </div>
                    <span class="delete j-custom-delete"></span>
                    {{if j === ($cube.children.length-1)}}
                    <span class="add j-custom-add"></span>
                    {{/if}}
                </div>
                {{/each}}
            </div>
            <span class="custom-error-msg j-custom-error-msg hide"></span>
        </div>
        {{/each}}
    </div>
    <span class="prompt mt-30">注：右下角的图标用于校验当前语句是否正确</span>
</div>